package cn.itlaobing.eshop.web.servlet;

import cn.itlaobing.eshop.web.annotation.RequestMapping;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Description:
 * @Author: WangDong
 * @Date: 2017/11/21 10:42
 */
@WebServlet("/reglogin/*")
public class RegOrLoginServlet extends BaseServlet {
    @RequestMapping("/login")
    public void Login(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.getRequestDispatcher("/WEB-INF/views/members/login.jsp").forward(request,response);
    }

    @RequestMapping("/register")
    public void Register(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.getRequestDispatcher("/WEB-INF/views/members/register.jsp").forward(request,response);
    }

    @RequestMapping("/info")
    public void Info(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.getRequestDispatcher("/WEB-INF/views/members/info.jsp").forward(request,response);
    }
}
